package com.cskaoyan.service;

import com.cskaoyan.bean.User;
import com.cskaoyan.bean.UserInfo;
import com.cskaoyan.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserDao userDao;

    @Override
    public List<User> query(UserInfo userInfo) {
        return userDao.selectUsers(userInfo);
    }

    @Override
    public void add(User user) {
        userDao.insert(user);
    }
}
